package com.espirit.eap.manager;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Embeddable;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

import com.espirit.eap.sa.LoginUser;


@Embeddable
public class RevisionHistory implements Serializable{
	private static final long serialVersionUID = 2372619669868311106L;
	private LoginUser createdBy;
	private Date createdOn;
	private Date createdOn2;  //主要用于查询 from .. to
	private LoginUser modifiedBy;  
	private Date modifyOn ; //修改日期
	private Date modifyOn2;  //主要用于查询 from .. to
	
	@ManyToOne(targetEntity=LoginUser.class,fetch=FetchType.LAZY)
	public LoginUser getCreatedBy() {
		return createdBy;
	}
	public void setCreatedBy(LoginUser createdBy) {
		this.createdBy = createdBy;
	}
	public Date getCreatedOn() {
		return createdOn;
	}
	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}
	@Transient
	public Date getCreatedOn2() {
		return createdOn2;
	}
	public void setCreatedOn2(Date createdOn2) {
		this.createdOn2 = createdOn2;
	}
	public void setModifyOn(Date modifyOn) {
		this.modifyOn = modifyOn;
	}
	public Date getModifyOn() {
		return modifyOn;
	}
	public void setModifiedBy(LoginUser modifiedBy) {
		this.modifiedBy = modifiedBy;
	}
	@ManyToOne(targetEntity=LoginUser.class,fetch=FetchType.LAZY)
	public LoginUser getModifiedBy() {
		return modifiedBy;
	}
	public void setModifyOn2(Date modifyOn2) {
		this.modifyOn2 = modifyOn2;
	}
	@Transient
	public Date getModifyOn2() {
		return modifyOn2;
	}
	
}
